"""
[143, 170, 39, 31, 197, 62, 143, 97, 146, 26]
"""
from timeit import Timer
def append_test():
    li=[]
    for x in range(10000):
        li.append(x)
def insert_test():
    li=[]
    for x in range(10000):
        li.insert(0,x)

appendTime=Timer("append_test()",'from __main__ import append_test')
insertTime=Timer("insert_test()",'from __main__ import insert_test')
print("列表append操作执行时间：",appendTime.timeit(1000))
print("列表插入的执行时间",insertTime.timeit(1000))